﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:es="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" 
    x:Class="PhoneInfo.Page.Page1"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="false">
    <phone:PhoneApplicationPage.Resources>
        <shell:ApplicationBar x:Key="AppBar" ForegroundColor="#ffffffff"  BackgroundColor="#ff31b2e7">
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_send.png" Text="发表评论" Click="Reply"/>
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_cancel.png" Text="取消评论" Click="cancl"/>
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBar1" ForegroundColor="#ffffffff"  BackgroundColor="#212121">
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_send.png" Text="发表评论" Click="Reply"/>
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_cancel.png" Text="取消评论" Click="cancl"/>
        </shell:ApplicationBar>
        <ControlTemplate x:Key="PhoneDisabledTextBoxTemplate" TargetType="TextBox">
        	<ContentControl x:Name="ContentElement" BorderThickness="0" HorizontalContentAlignment="Stretch" Margin="{StaticResource PhoneTextBoxInnerMargin}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="Stretch"/>
        </ControlTemplate>
        <Style x:Key="TextBoxStyle1" TargetType="TextBox">
        	<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
        	<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
        	<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
        	<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
        	<Setter Property="BorderBrush" Value="{StaticResource PhoneTextBoxBrush}"/>
        	<Setter Property="SelectionBackground" Value="{StaticResource PhoneAccentBrush}"/>
        	<Setter Property="SelectionForeground" Value="{StaticResource PhoneTextBoxSelectionForegroundBrush}"/>
        	<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
        	<Setter Property="Padding" Value="2"/>
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="TextBox">
        				<Grid Background="Transparent">
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="MouseOver"/>
        							<VisualState x:Name="Disabled">
        								<Storyboard>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBorder">
        										<DiscreteObjectKeyFrame KeyTime="0">
        											<DiscreteObjectKeyFrame.Value>
        												<Visibility>Collapsed</Visibility>
        											</DiscreteObjectKeyFrame.Value>
        										</DiscreteObjectKeyFrame>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOrReadonlyBorder">
        										<DiscreteObjectKeyFrame KeyTime="0">
        											<DiscreteObjectKeyFrame.Value>
        												<Visibility>Visible</Visibility>
        											</DiscreteObjectKeyFrame.Value>
        										</DiscreteObjectKeyFrame>
        									</ObjectAnimationUsingKeyFrames>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="ReadOnly">
        								<Storyboard>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBorder">
        										<DiscreteObjectKeyFrame KeyTime="0">
        											<DiscreteObjectKeyFrame.Value>
        												<Visibility>Collapsed</Visibility>
        											</DiscreteObjectKeyFrame.Value>
        										</DiscreteObjectKeyFrame>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOrReadonlyBorder">
        										<DiscreteObjectKeyFrame KeyTime="0">
        											<DiscreteObjectKeyFrame.Value>
        												<Visibility>Visible</Visibility>
        											</DiscreteObjectKeyFrame.Value>
        										</DiscreteObjectKeyFrame>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="DisabledOrReadonlyBorder">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="DisabledOrReadonlyBorder">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DisabledOrReadonlyContent">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxReadOnlyBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        								</Storyboard>
        							</VisualState>
        						</VisualStateGroup>
        						<VisualStateGroup x:Name="FocusStates">
        							<VisualState x:Name="Focused">
        								<Storyboard>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="EnabledBorder">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxEditBorderBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ColorAnimation Duration="0" To="#FFBDE3F5" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="EnabledBorder" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Unfocused">
        								<Storyboard>
        									<ColorAnimation Duration="0" To="#FFBDE3F5" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="EnabledBorder" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Border x:Name="EnabledBorder" 
        						Margin="{StaticResource PhoneTouchTargetOverhang}" Background="#E1CEE8FF">
        						<ContentControl x:Name="ContentElement" BorderThickness="0" HorizontalContentAlignment="Stretch" Margin="{StaticResource PhoneTextBoxInnerMargin}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="Stretch"/>
        					</Border>
        					<Border x:Name="DisabledOrReadonlyBorder" BorderBrush="{StaticResource PhoneDisabledBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" Margin="{StaticResource PhoneTouchTargetOverhang}" Visibility="Collapsed">
        						<TextBox x:Name="DisabledOrReadonlyContent" Background="Transparent" Foreground="{StaticResource PhoneDisabledBrush}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" IsReadOnly="True" SelectionForeground="{TemplateBinding SelectionForeground}" SelectionBackground="{TemplateBinding SelectionBackground}" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" Text="{TemplateBinding Text}" Template="{StaticResource PhoneDisabledTextBoxTemplate}" BorderBrush="#FFBDE3F5"/>
        					</Border>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
    </phone:PhoneApplicationPage.Resources>
 
    <!--演示 ApplicationBar 用法的示例代码-->
   

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
	<phone:PhoneApplicationPage.Style>
		<StaticResource ResourceKey="TransitionPageStyle"/>
	</phone:PhoneApplicationPage.Style>
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="{Binding cuTheme.TextBrush, Source={StaticResource Theme}}">
    	<Image Margin="163,66,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.069,0.167" Source="/Icon/info/face.png" Stretch="None" HorizontalAlignment="Left"/>
    	<TextBlock HorizontalAlignment="Right" Margin="0,70,333,0" TextWrapping="Wrap"  
                   Foreground="{Binding cuTheme.SecondTextBrush, Source={StaticResource Theme}}" 
                   Text="发表评论" VerticalAlignment="Top" FontSize="28"/>
    	<TextBox Margin="8,120,0,0" TextWrapping="Wrap" x:Name="ReplyContent" Height="231" VerticalAlignment="Top" Background="#FFBDE3F5" SelectionForeground="#FFBDE3F5" BorderBrush="#FFBDE3F5" Style="{StaticResource TextBoxStyle1}" HorizontalAlignment="Left" Width="464"/>
        <Popup x:Name="FullModePopup" Opacity="0.9" d:IsHidden="True" >
                <!-- Popup.Child should always be a Border -->
                <Grid VerticalAlignment="Top" Canvas.Left="3" Canvas.Top="0" Canvas.ZIndex="0" Width="480" Height="800">
                <TextBlock x:Name="rezultMsg" TextWrapping="Wrap" Text="评论成功" VerticalAlignment="Top" Margin="178,457,219,0" d:LayoutOverrides="Width"/>
                <Image Source="/SplashScreenImage.jpg" Stretch="Fill" Opacity="0.5"/>
                <ProgressBar  Foreground="Orange" x:Name="ProgBar" Visibility="Visible"  IsIndeterminate="True" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" Grid.ColumnSpan="2"  Width="480" Canvas.ZIndex="1" />
                </Grid>
        </Popup>
        <Button Content="Button" x:Name="btnsubmit" Margin="194,0,157,222" VerticalAlignment="Bottom" d:LayoutOverrides="Width" Height="1" RenderTransformOrigin="0.5,0.5">
        	<Button.RenderTransform>
        		<CompositeTransform ScaleY="-1"/>
        	</Button.RenderTransform>
        </Button>
    	<es:RegularPolygon Fill="#E1CEE8FF" HorizontalAlignment="Right" Height="24.195" InnerRadius="1" Margin="0,339.098,24.107,0" PointCount="3" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Top" Width="46.366" RenderTransformOrigin="0.5,0.5">
    		<es:RegularPolygon.RenderTransform>
    			<CompositeTransform Rotation="180"/>
    		</es:RegularPolygon.RenderTransform>
    	</es:RegularPolygon>
    </Grid>
   

</phone:PhoneApplicationPage>
